home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d8 / qns310.arc / QNS.BAT < prev    next >
DOS Batch File  |  1991-04-28  |  4KB  |  137 lines

  1. @echo ON
  2.  cls
  3. :┌──────────────────────────────────────────────────────────────────────────┐
  4. :│ QNS.BAT       Copyright 1988-1990 by Rik Brown                           │
  5. :│                                                                          │
  6. :│               QNS.BAT main batch file for Qmodem Networking Script       │
  7. :└──────────────────────────────────────────────────────────────────────────┘
  8.  
  9. :------------------------------------------------------------------------
  10. : BE SURE TO REVISE THE DRIVE/DIRECTORIES TO MATCH YOUR OWN REQUIREMENTS.
  11. :------------------------------------------------------------------------
  12.  
  13.  if [%1]==[] goto ERRORPARM
  14.  
  15.  rem Make environment variables
  16.  
  17.  set QNSMAIL=
  18.  set QNS%1=@
  19.  
  20.  if [%QNSMIDI%]==[@]    set QNSMAIL=RELAY
  21.  if [%QNSMUSIC%]==[@]   set QNSMAIL=RNET
  22.  if [%QNSSALTAIR%]==[@] set QNSMAIL=RNET
  23.  if [%QNSTRAVEL%]==[@]  set QNSMAIL=RNET
  24.  
  25. :----------------------------------------------------------------------------
  26. : You may add/change/delete support for any PCBoard BBS by changing the name
  27. : of the CONFIGFILEs above. For example, the name of the CONFIGFILE embedded
  28. : in [%QNSTRAVEL%] is TRAVEL. For a board with a CONFIGFILE named HOWARD
  29. : and using RNET you could add above the following line:
  30. :
  31. :            if [%QNSHOWARD%]==[@]  set QNSMAIL=RNET
  32. :----------------------------------------------------------------------------
  33.  
  34.  set QNSCALL=
  35.  set QNSIMPORT=
  36.  if not [%2]==[] set QNS%2=#
  37.  
  38.  if [%QNSCALL%]==[#]    set QNSOPTION=CALL
  39.  if [%QNSIMPORT%]==[#]  set QNSOPTION=IMPORT
  40.  
  41.  if [%QNSMAIL%]==[RNET]  goto RNET%QNSOPTION%
  42.  if [%QNSMAIL%]==[RELAY] goto RELAY%QNSOPTION%
  43.  
  44.  rem Otherwise drop to ERRORPARM
  45.  
  46. :ERRORPARM
  47.  echo      Your command: QNS.BAT %1 %2
  48.  echo ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
  49.  echo ▓▓▓┌──────────────────────────────────────────────────────────┐▓▓▓▓
  50.  echo ▓▓▓│                          (1)          (2)                │░░▓▓
  51.  echo ▓▓▓│        Usage: QNS.BAT CONFIGFILE [IMPORT/CALL]           │░░▓▓
  52.  echo ▓▓▓│                                                          │░░▓▓
  53.  echo ▓▓▓│ PARAMETER 1   The QNS configfile in your Qmodem script   │░░▓▓
  54.  echo ▓▓▓│  (Required)   directory. It must be pre-configured for   │░░▓▓
  55.  echo ▓▓▓│               the BBS to which you are calling.          │░░▓▓
  56.  echo ▓▓▓│                                                          │░░▓▓
  57.  echo ▓▓▓│ PARAMETER 2   If you will not be exporting messages (or  │░░▓▓
  58.  echo ▓▓▓│  (Optional)   have already done so manually or from a    │░░▓▓
  59.  echo ▓▓▓│               previous incomplete mail run) and wish to  │░░▓▓
  60.  echo ▓▓▓│               jump directly to the IMPORT or CALL phase  │░░▓▓
  61.  echo ▓▓▓│               of this batch file, then indicate either   │░░▓▓
  62.  echo ▓▓▓│               IMPORT or CALL.                            │░░▓▓
  63.  echo ▓▓▓└──────────────────────────────────────────────────────────┘░░▓▓
  64.  echo ▓▓▓▓▓▓░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▓▓
  65.  echo ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
  66.  goto end
  67.  
  68. :RELAY
  69.  R:
  70.  cd \RELAY\NODEMIDI
  71.  if not exist IN.RLY goto RELAYEXPORT
  72.  echo Backing up IN.RLY files....
  73.  if exist IN.RLY copy IN.RLY IN.RL1 >nul
  74.  if exist IN.RLY del  IN.RLY
  75.  goto relayexport
  76.  
  77. :RELAYEXPORT
  78.  R:
  79.  cd \RELAY
  80.  if exist R:\RELAY\NODEMIDI\TRAVEL.RLY goto RELAYCALL
  81.  EXPORT.EXE
  82.  goto relaycall
  83.  
  84. :RELAYCALL
  85.  if exist R:\RELAY\NODEMIDI\%1.CAP del R:\RELAY\NODEMIDI\%1.CAP
  86.  R:
  87.  cd \QMODEM\SCRIPT
  88.  copy %1 Q-SETUP.CFG >nul
  89.  R:
  90.  cd \QMODEM
  91.  QMODEM.EXE /s=Q-SETUP.CMD
  92.  goto relayimport
  93.  
  94. :RELAYIMPORT
  95.  R:
  96.  cd \RELAY\NODEMIDI
  97.  if not exist IN.RLY goto end
  98.  copy IN.RLY IN.RL1 >nul
  99.  R:
  100.  cd \RELAY
  101.  IMPORT.EXE
  102.  goto end
  103.  
  104. :RNET
  105.  C:
  106.  cd \RNET
  107.  if not exist %1.qwk goto RNETEXPORT
  108.  echo Backing up %1.QWK files....
  109.  if exist %1.qwk copy %1.qwk %1.qw1 >nul
  110.  if exist %1.qwk del %1.qwk
  111.  goto rnetexport
  112.  
  113. :RNETEXPORT
  114.  rnet export %1
  115.  goto rnetcall
  116.  
  117. :RNETCALL
  118.  if exist c:\rnet\%1.cap del c:\rnet\%1.cap
  119.  R:
  120.  cd \QMODEM\SCRIPT
  121.  copy %1 Q-SETUP.CFG >nul
  122.  R:
  123.  cd \QMODEM
  124.  QMODEM.EXE /s=Q-SETUP.CMD
  125.  goto rnetimport
  126.  
  127. :RNETIMPORT
  128.  c:
  129.  cd \rnet
  130.  if not exist %1.qwk goto end
  131.  rnet import %1
  132.  goto end
  133.  
  134. :END
  135.  for %%A in (MAIL OPTION CALL IMPORT %1 %2) do set QNS%%A=
  136.  echo                  * * * QNS Routine Completed * * *
  137.